using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TwoTwoPanel : MonoBehaviour
{
    List<TwoTwoData> datas;
    public TwoTwoItem Item;
    public Transform ItemGroup;
    // Start is called before the first frame update
    void Start()
    {
        datas = new List<TwoTwoData>
        {
            new TwoTwoData { id = 1, name = "旅行1步", des = "完成任务1", needNum = 0, aimNum = 1, state = 0 },
            new TwoTwoData { id = 2, name = "旅行8步", des = "完成任务2", needNum = 0, aimNum = 8, state = 0 },
            new TwoTwoData { id = 3, name = "旅行12步", des = "完成任务3", needNum = 0, aimNum = 12, state = 0 }
        };
        for (int i = 0; i < datas.Count; i++)
        {
            var temp = Instantiate(Item, ItemGroup);
            temp.gameObject.SetActive(true);
            temp.init(datas[i]);
        }
        Item.gameObject.SetActive(false);
    }

    // Update is called once per frame
    void Update()
    {

    }
}
public class TwoTwoData
{
    public int id;
    public string name;
    public string des;
    public int needNum;
    public int aimNum;
    public int state;
}
